package com.t3go.t3_map.entity;

import androidx.annotation.Keep;

import com.t3map.api.map.model.T3LatLng;

import java.util.ArrayList;
import java.util.List;

@Keep
public class Polyline {

    /**
     * style : {"width":10,"fillColorValue":"#fcba03","strokeColorValue":"#fcba03"}
     * points : [[116.359406,39.910612],[116.365948,39.910298],[116.371775,39.912964],[116.376478,39.913435],[116.404897,39.916258],[116.417165,39.91367]]
     * uid : 1028941879
     */

    private StyleBean style;
    private String uid;
    private List<List<Double>> points;
    private LabelInfo label;

    public StyleBean getStyle() {
        return style;
    }

    public void setStyle(StyleBean style) {
        this.style = style;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public List<T3LatLng> getPoints() {
        List<T3LatLng> list = new ArrayList<>();
        for (List<Double> temp : points) {
            list.add(new T3LatLng(temp.get(1), temp.get(0)));
        }
        return list;
    }

    public void setPoints(List<List<Double>> points) {
        this.points = points;
    }

    public LabelInfo getLabel() {
        return label;
    }

    public void setLabel(LabelInfo label) {
        this.label = label;
    }

    public static class StyleBean {
        /**
         * width : 10
         * fillColorValue : #fcba03
         * strokeColorValue : #fcba03
         */

        private int width;
        private String fillColorValue;
        private String strokeColorValue;

        private int miterLimit;
        private int lineDashType;
        private int lineCapType;
        private int lineJoinType;
        private String traffic;
        private boolean isSelected;
        private int lineType;

        public int getWidth() {
            return width;
        }

        public void setWidth(int width) {
            this.width = width;
        }

        public String getFillColorValue() {
            return fillColorValue;
        }

        public void setFillColorValue(String fillColorValue) {
            this.fillColorValue = fillColorValue;
        }

        public String getStrokeColorValue() {
            return strokeColorValue;
        }

        public void setStrokeColorValue(String strokeColorValue) {
            this.strokeColorValue = strokeColorValue;
        }

        public int getMiterLimit() {
            return miterLimit;
        }

        public void setMiterLimit(int miterLimit) {
            this.miterLimit = miterLimit;
        }

        public int getLineDashType() {
            return lineDashType;
        }

        public void setLineDashType(int lineDashType) {
            this.lineDashType = lineDashType;
        }

        public int getLineCapType() {
            return lineCapType;
        }

        public void setLineCapType(int lineCapType) {
            this.lineCapType = lineCapType;
        }

        public int getLineJoinType() {
            return lineJoinType;
        }

        public void setLineJoinType(int lineJoinType) {
            this.lineJoinType = lineJoinType;
        }

        public String getTraffic() {
            return traffic;
        }

        public void setTraffic(String traffic) {
            this.traffic = traffic;
        }

        public boolean isSelected() {
            return isSelected;
        }

        public void setSelected(boolean selected) {
            isSelected = selected;
        }

        public int getLineType() {
            return lineType;
        }

        public void setLineType(int lineType) {
            this.lineType = lineType;
        }
    }
}